//
//  FoodCommentCell.swift
//  NeusoftSchool
//
//  Created by 李狗蛋 on 2017/5/8.
//  Copyright © 2017年 李狗蛋. All rights reserved.
//

import UIKit

class FoodCommentCell: UITableViewCell {

    var foodName:UILabel!
    var price:UILabel!
    var shopName:UILabel!
    var userName:UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        foodName = UILabel()
        foodName.font = UIFont.systemFont(ofSize: 16)
        foodName.backgroundColor = UIColor.purple
        foodName.textColor = UIColor.white
        self.contentView.addSubview(foodName)
        
        price = UILabel()
        price.font = UIFont.systemFont(ofSize: 16)
        price.backgroundColor = UIColor.purple
        price.textColor = UIColor.white
        self.contentView.addSubview(price)
        
        shopName = UILabel()
        shopName.textAlignment = .left
        shopName.font = UIFont.systemFont(ofSize: 16)
        shopName.backgroundColor = UIColor.purple
        shopName.textColor = UIColor.white
        self.contentView.addSubview(shopName)
        
        userName = UILabel()
        userName.textAlignment = .center
        userName.font = UIFont.systemFont(ofSize: 16)
        userName.backgroundColor = UIColor.purple
        userName.textColor = UIColor.white
        self.contentView.addSubview(userName)
        textLabel?.font = UIFont.systemFont(ofSize: 16)
        // Initialization code
    }
    
    override func layoutSubviews() {
        textLabel?.frame = CGRect(x: 10, y: 0, width: UIScreen.main.bounds.width, height: 30)
        
        foodName.frame = CGRect(x: 10, y: 32, width: 90, height: 30)
        price.frame = CGRect(x: 100, y: 32, width: 90, height: 30)
        shopName.frame = CGRect(x: 190, y: 32, width: 200, height: 30)
        userName.frame = CGRect(x: 10, y: 60, width: Int(ScreenWidth), height: 20)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
